package com.miukoo.aikao.qmanage.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.miukoo.aikao.core.dtos.PageReqDto;
import com.miukoo.aikao.core.dtos.PageResDto;
import com.miukoo.aikao.core.dtos.QuestionAnswerDto;
import com.miukoo.aikao.core.pojos.QuestionAnswer;

import java.util.List;

/**
* <p>
* 候选答案业务类
* </p>
*
* @author 聪明笨狗
* @since 2020-05-25 13:23
*/
public interface QuestionAnswerService extends IService<QuestionAnswer> {

    /**
    * 分页查询数据
    * @param reqDto
    * @return
    */
    PageResDto<List<QuestionAnswer>> paging(PageReqDto<QuestionAnswerDto> reqDto);

    /**
     * 根据题目ID查询答案并随机
     * @param quId
     * @return
     */
    List<QuestionAnswer> listAnswerByRandom(Long quId);

    /**
     * 根据问题查找答案
     * @param quId
     * @return
     */
    List<QuestionAnswerDto> listByQuestion(Long quId);

    /**
     * 保存试题
     * @param quId
     * @param list
     */
    void saveAll(Long quId, List<QuestionAnswerDto> list);
}
